<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" %>
<aside class="main-sidebar">
    <section class="sidebar">
        <ul class="sidebar-menu">
            <li class="header">菜单</li>

             <c:forEach var="item" items="${menuList}" varStatus="status">

                         <li class="treeview
                                                                <c:if test="${item.active == true}">active</c:if>"
                                                        >
                               <c:if test="${item.children!=null && fn:length(item.children) > 0}">
                                                    <a>
                                                        <i class="fa fa-laptop"></i>
                                                        <span>${item.name}</span>
                                                        <i class="fa fa-angle-left pull-right"></i>
                                                    </a>

                                                    <ul class="treeview-menu">
                                                        <c:forEach var="item2" items="${item.children}" varStatus="status2">
                                                            <li
                                                                    <c:if test="${item2.active == true}">class="active"</c:if>
                                                                    ><a href="${item2.url}"><i class="fa fa-circle-o"></i>${item2.name}</a></li>
                                                        </c:forEach>
                                                    </ul>

                               </c:if>

                                       <c:if test="${item.children==null || fn:length(item.children) == 0}">
                                                   <a href="${item.url}">
                                                                          <i class="fa fa-laptop"></i>
                                                                          <span>${item.name}</span>
                                                                         <i class="fa fa-angle-left pull-right"></i>
                                                  </a>
                                      </c:if>
                        </li>
            </c:forEach>

        </ul>
    </section>
</aside>